For Problem 1

For Problem 2

For Problem 3

For Problem 4